package com.example.demo.controller;

import com.example.demo.entity.Movie;
import com.example.demo.service.MovieService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.dreamlu.mica.common.support.IController;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * 服务控制器
 *
 * @author kancy
 * @since 2021-06-01 09:44:00
 * @description 由 Mybatisplus Code Generator 创建
 */
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/movie")
public class MovieController implements IController {
    private final MovieService movieService;

    //
    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public List<Movie> getMovies()
    {
        return movieService.getMovieList();
    }
}